﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XSTDZ.ERP.Application.DataContracts;

namespace XSTDZ.ERP.Application
{
    /// <summary>
    /// 日常开支
    /// </summary>
    public interface IUsualFinanceService
    {
        void Add(UsualFinanceDto usualFinanceDto);
        void Update(UsualFinanceDto usualFinanceDto);
        void Delete(Guid ID, Guid detailID);
        UsualFinanceDto GetUsualFinance(Guid ID);
        IList<UsualFinanceDto> GetUsualFinances();

        #region 日常开支明细
        /// <summary>
        /// 添加日常开支明细
        /// </summary>
        /// <param name="usualFinanceId"></param>
        /// <param name="usualFinanceDetailDto"></param>
        Guid AddUsualFinanceDetail(UsualFinanceDto usualFinanceDto, IEnumerable<UsualFinanceDetailDto> usualFinanceDetailDto);
        /// <summary>
        /// 更新日常开支明细
        /// </summary>
        /// <param name="usualFinanceId"></param>
        /// <param name="usualFinanceDetailDto"></param>
        Guid UpdateUsualFinanceDetail(UsualFinanceDto usualFinanceDto, IEnumerable<UsualFinanceDetailDto> usualFinanceDetailDto);
        void ConvertUsualFinanceDeleteState(Guid usualFinanceId, IEnumerable<Guid> usualFinanceDetailIds);
        /// <summary>
        /// 获得一条日常开支明细
        /// </summary>
        /// <param name="usualFinanceId"></param>
        /// <returns></returns>
        UsualFinanceDetailDto GetUsualFinanceDetail(Guid usualFinanceId);
        /// <summary>
        /// 获取对应记录下的所有明细
        /// </summary>
        /// <param name="usualFinanceId"></param>
        /// <returns></returns>
        IEnumerable<UsualFinanceDetailDto> GetUsualFinanceDetails(Guid usualFinanceId);
        #endregion

        #region 汇款记录
        /// <summary>
        /// 添加汇款记录
        /// </summary>
        /// <param name="remittanceRecordDto"></param>
        void AddRemittanceRecord(RemittanceRecordDto remittanceRecordDto);
        /// <summary>
        /// 更新汇款记录
        /// </summary>
        /// <param name="remittanceRecordDto"></param>
        void UpdateRemittanceRecord(RemittanceRecordDto remittanceRecordDto);
        /// <summary>
        /// 删除汇款记录
        /// </summary>
        /// <param name="ID"></param>
        void DeleteRemittanceRecord(Guid ID);
        /// <summary>
        /// 获得汇款记录
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        RemittanceRecordDto GetRemittanceRecord(Guid ID);
        /// <summary>
        /// 汇款记录确认
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="UserId"></param>
        /// <param name="IsOk"></param>
        /// <returns></returns>
        Guid ConfirmRemittanceRecord(Guid ID,Guid UserId,bool IsOk);

        #endregion
    }
}
